#include<bits/stdc++.h>
using namespace std;
#define gc getchar
#define pc putchar
#define pb push_back
#define mp make_pair
#define db double
#define ls (id<<1)
#define rs ((id<<1)|1)
#define mid ((l+r)>>1)
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rof(i,a,b) for(int i=(a);i>=(b);--i)

int read(){
    int ret=0,f=0; char ch=gc();
    while(ch<'0'||ch>'9') f|=(ch=='-'),ch=gc();
    while(ch>='0'&&ch<='9') ret=(ret<<1)+(ret<<3)+(ch^48),ch=gc();
    return f?-ret:ret;
}

void write(int x){
    if(!x) return pc('0'),void();
    if(x<0) pc('-'),x=-x;
    int stk[30],tp=0;
    while(x) stk[++tp]=x%10,x/=10;
    while(tp) pc('0'+stk[tp--]);
    return;
}

const int Maxn=1e6+10,INF=1e9+10;
int N,C[Maxn];
db A[Maxn],B[Maxn],Ans=INF;
bool Vis[Maxn],Sd[Maxn];

void calc(){
	db r=0;
	For(i,1,N){
		int t=C[i];
		db x=0;
		if(N&1){
			if(i==N/2+1) x=0.5;
			else if(i<=N/2) x=-1.0*N/2+i-1;
			else x=0.5+(i-N/2-1);
		}else{
			if(i<=N/2) x=-N/2+i-1;
			else x=i-N/2;
		}
		db y=Sd[t]?A[t]:B[t],z=Sd[t]?B[t]/2:A[t]/2;
		db l=sqrt(x*x+y*y); r=max(r,sqrt(l*l+z*z));
	}
	Ans=min(Ans,r);
}

void DFS(int x){
	if(x>N) return calc();
	For(i,1,N) if(!Vis[i]){
		Vis[i]=1,Sd[i]=1,C[x]=i,DFS(x+1);
		Sd[i]=0,DFS(x+1),Vis[i]=0;
	}
}

int main(){
    freopen("temple.in","r",stdin);
    freopen("temple.out","w",stdout);
	N=read(); For(i,1,N) scanf("%lf %lf",&A[i],&B[i]);
	DFS(1); printf("%.6lf",Ans);
    return 0;
}
